package com.beordie.service;

import com.beordie.dao.TypeMapper;
import com.beordie.model.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Description 类型的服务层
 * @Date 2021/8/3 9:52
 * @Created 30500
 */
@Service
public class TypeService {
    @Autowired
    private TypeMapper typeMapper;

    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public List<Type> getAll() {
        List<Type> typeList = typeMapper.selectAll();
        return typeList;
    }
}
